package com.ldr.custom.spring.v2.webmvc;

import java.lang.reflect.Method;
import java.util.Map;
import java.util.regex.Pattern;

public class GPHandlerMapping {


    private Object controller;
    private Method method;
    private Pattern pattern;//url改成正则，spring是使用正则匹对
    private Map<String, Integer> paramIndexMapping;
    private Class<?>[] parameterTypes;

    public GPHandlerMapping(Pattern pattern, Object controller, Method method) {
        this.controller = controller;
        this.method = method;
        this.pattern = pattern;
        parameterTypes = method.getParameterTypes();

    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public Map<String, Integer> getParamIndexMapping() {
        return paramIndexMapping;
    }

    public void setParamIndexMapping(Map<String, Integer> paramIndexMapping) {
        this.paramIndexMapping = paramIndexMapping;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }
}


